from django.conf.urls.defaults import patterns, include, url
from django.views.generic import ListView,DetailView
from task.models import Posts

urlpatterns = patterns('task.views',

    url(r'^$',ListView.as_view(queryset = Posts.objects.all().order_by("-created")[:2],template_name = "blog.html")),
	url(r'^(?P<pk>\d+)$', DetailView.as_view(model=Posts,template_name = "post.html")),
	url(r'^archives/$', ListView.as_view(queryset = Posts.objects.all().order_by("-created"),template_name = "archives.html")),
)

